Skip to content

Only enforce open boundary mass conservation for open boundaries#4674

Merged
navidcy merged 1 commit intomainfrom
ncc-glw/dont-enforce-if-not-needed
Jul 27, 2025
Merged

Only enforce open boundary mass conservation for open boundaries#4674
navidcy merged 1 commit intomainfrom
ncc-glw/dont-enforce-if-not-needed

Conversation

@navidcy
Copy link
Copy Markdown
Member

@navidcy navidcy commented Jul 26, 2025

Following from #4627, I noticed that enforce_open_boundary_mass_conservation! was always called and doing stuff even when there was no open boundaries.

This PR deals with that.

with @glwagner

@navidcy navidcy requested review from glwagner and tomchor July 26, 2025 22:39
@navidcy navidcy added performance 🏍️ So we can get the wrong answer even faster boundary conditions 🏓 labels Jul 26, 2025
@navidcy navidcy merged commit 46d45e7 into main Jul 27, 2025
66 of 68 checks passed
@navidcy navidcy deleted the ncc-glw/dont-enforce-if-not-needed branch July 27, 2025 00:55
@glwagner
Copy link
Copy Markdown
Member

An additional point we discussed was to use tuples instead of arrays to hold the list of open boundaries.

@navidcy
Copy link
Copy Markdown
Member Author

navidcy commented Jul 30, 2025

You can't push! into tuples tho. This method:

function initialize_boundary_mass_fluxes(velocities::NamedTuple)

might require a bit of rethinking/refactoring.

@glwagner
Copy link
Copy Markdown
Member

You can't push! into tuples tho. This method:

function initialize_boundary_mass_fluxes(velocities::NamedTuple)

might require a bit of rethinking/refactoring.

We just need to convert the arrays to tuples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

boundary conditions 🏓 performance 🏍️ So we can get the wrong answer even faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants